﻿using Md.Api.Model;
using Md.Api.Model.Manage.MdProductExperience.Request;
using Md.Api.Service.Manage.MdProductExperience;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace Md.Api.Controllers.Manage;
/// <summary>
/// 体验产品
/// </summary>
[ApiController]
[Produces("application/json")]
[Route("md-api/manage/md/product/experience")]
public class MdProductExperienceController : ControllerBase
{
    /// <summary>
    /// 添加体验产品关联服务
    /// </summary>
    public InsertMdProductExperienceService insertMdProductExperienceService { get; set; }
    /// <summary>
    /// 添加体验产品关联
    /// </summary>
    /// <param name="model">请求实体</param>
    /// <returns>ResponseMessageModel</returns>
    [HttpPost, AllowAnonymous]
    public async Task<ResponseMessageModel> InsertMdProductExperience([FromBody] RequestInsertMdProductExperienceModel model)
    {
        return await Task.Run(() => insertMdProductExperienceService.Execute(model));
    }
}

